var rp = require('request-promise');
const { target } = require('../utils/options');


const get = async () => {
    var options = {
        method: 'POSt',
        uri: `${ target }/order/getOrder`,
        qs: {},
        json: true // Automatically stringifies the body to JSON
    };
    let data = await rp(options);
    return data;
};

const update = async (parameter) => {
    var options = {
        method: 'POSt',
        uri: `${ target }/order/updateOrder`,
        qs: { },
        body: parameter,
        json: true // Automatically stringifies the body to JSON
    };
    let data = await rp(options);
    return data;
};

const search = async (parameter) => {
    var options = {
        method: 'POSt',
        uri: `${ target }/order/searchOrder`,
        qs: { },
        body: parameter,
        json: true // Automatically stringifies the body to JSON
    };
    let data = await rp(options);
    return data;
};
module.exports = { get,update,search,search };